/**
 */
package gatperdut.chato.model.Chato.Entity.impl;

import gatperdut.chato.model.Chato.Entity.EntityPackage;
import gatperdut.chato.model.Chato.Entity.Settings;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Settings</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.Entity.impl.SettingsImpl#isPacifist <em>Pacifist</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Entity.impl.SettingsImpl#isAcceptGive <em>Accept Give</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SettingsImpl extends CDOObjectImpl implements Settings {
    /**
     * The default value of the '{@link #isPacifist() <em>Pacifist</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #isPacifist()
     * @generated
     * @ordered
     */
    protected static final boolean PACIFIST_EDEFAULT = false;

    /**
     * The default value of the '{@link #isAcceptGive() <em>Accept Give</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #isAcceptGive()
     * @generated
     * @ordered
     */
    protected static final boolean ACCEPT_GIVE_EDEFAULT = true;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected SettingsImpl() {
        super();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return EntityPackage.Literals.SETTINGS;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected int eStaticFeatureCount() {
        return 0;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public boolean isPacifist() {
        return (Boolean)eDynamicGet(EntityPackage.SETTINGS__PACIFIST, EntityPackage.Literals.SETTINGS__PACIFIST, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setPacifist(boolean newPacifist) {
        eDynamicSet(EntityPackage.SETTINGS__PACIFIST, EntityPackage.Literals.SETTINGS__PACIFIST, newPacifist);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public boolean isAcceptGive() {
        return (Boolean)eDynamicGet(EntityPackage.SETTINGS__ACCEPT_GIVE, EntityPackage.Literals.SETTINGS__ACCEPT_GIVE, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setAcceptGive(boolean newAcceptGive) {
        eDynamicSet(EntityPackage.SETTINGS__ACCEPT_GIVE, EntityPackage.Literals.SETTINGS__ACCEPT_GIVE, newAcceptGive);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case EntityPackage.SETTINGS__PACIFIST:
                return isPacifist();
            case EntityPackage.SETTINGS__ACCEPT_GIVE:
                return isAcceptGive();
        }
        return super.eGet(featureID, resolve, coreType);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case EntityPackage.SETTINGS__PACIFIST:
                setPacifist((Boolean)newValue);
                return;
            case EntityPackage.SETTINGS__ACCEPT_GIVE:
                setAcceptGive((Boolean)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID) {
        switch (featureID) {
            case EntityPackage.SETTINGS__PACIFIST:
                setPacifist(PACIFIST_EDEFAULT);
                return;
            case EntityPackage.SETTINGS__ACCEPT_GIVE:
                setAcceptGive(ACCEPT_GIVE_EDEFAULT);
                return;
        }
        super.eUnset(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case EntityPackage.SETTINGS__PACIFIST:
                return isPacifist() != PACIFIST_EDEFAULT;
            case EntityPackage.SETTINGS__ACCEPT_GIVE:
                return isAcceptGive() != ACCEPT_GIVE_EDEFAULT;
        }
        return super.eIsSet(featureID);
    }

} //SettingsImpl
